package com.fulu.game.bi.controller.product;

import com.fulu.game.bi.entity.dto.FunnelAnalyseDetailListDTO;
import com.fulu.game.bi.entity.vo.Result;
import com.fulu.game.bi.service.impl.product.BehaviourFunnelStatService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 产品-漏斗分析
 */
@RestController
@RequestMapping("/api/product/funnel")
@Slf4j
public class FunnelAnalyseController {

    @Autowired
    private BehaviourFunnelStatService behaviourFunnelStatService;

    /**
     * 产品-漏斗分析-列表
     */
    @RequestMapping("/list")
    public Result list(FunnelAnalyseDetailListDTO dto) {
        return Result.success().data(behaviourFunnelStatService.list(dto));
    }

    /**
     * 产品-漏斗分析-列表-导出
     */
    @PostMapping("/export")
    public void listExport(FunnelAnalyseDetailListDTO dto) {
        behaviourFunnelStatService.listExport(dto);
    }

}
